//一个javascript对象
let user = {
    name: "乐哥哥",
    age: 3,
    sex: "男",
};
//对象转化成json字符串
let userStr = JSON.stringify(user);
console.log(userStr);
console.log(typeof userStr);

console.log("=======================");

//json字符串转化成对象
let obj = JSON.parse(userStr);
console.log(obj);
console.log(typeof obj);
